{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import joblib\n",
    "import os\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 读取旧数据\n",
    "old_plc_01 = joblib.load('../../刀具剩余寿命预测_旧数据/2.preprocess_train_data/train_plc/train_01_plc.lz4')\n",
    "old_sensor_01_26 = joblib.load('../../刀具剩余寿命预测_旧数据/2.preprocess_train_data/sensor_id_sort/01/26.lz4')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 读取新数据\n",
    "new_plc_01 = joblib.load('../../刀具剩余寿命预测_新数据/2.preprocess_train_data/train_plc/train_01_plc.lz4')\n",
    "new_sensor_01_26 = joblib.load('../../刀具剩余寿命预测_新数据/2.preprocess_train_data/sensor_id_sort/01/26.lz4')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 比较plc\n",
    "sum(new_plc_01['x'].values != old_plc_01['x'].values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1548800, 6)"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "old_sensor_01_26.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 比较sensor\n",
    "sum(old_sensor_01_26['vibration_1'] != new_sensor_01_26['current'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(old_sensor_01_26['current'] != new_sensor_01_26['vibration_1'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "old_sensor:['vibration_1','vibration_2','vibration_3', 'current']->['Current_1','Current_2','Current_3', 'Vibration_1']  \n",
    "new_sensor:['vibration_1','vibration_2','vibration_3', 'current']->['Vibration_1','Vibration_2','Vibration_3', 'Current_1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
